<h1> Question </h1>

<p>
  <%= @question.details %>
</p>

<h3> <%= link_to 'Answers', survey_admin_question_answers_url(@question) %>  </h3>

<% if  @question.answers.empty? %>
  There are currently no answers for this question.
<% else %>
  <ul id='answers_to_question'>
    <% @question.answers.each do |answer| %>
      <li data-answer_id=<%= answer.id %> >
        <%= link_to answer.display_position, survey_admin_question_answer_url(@question, answer) %>)
        <%= answer.details %><br/><br/><br/>
      </li>
    <% end %>
  </ul>
<% end %>

<p>
  <%= link_to "Edit", edit_survey_admin_question_path(@question), :class => 'button' %> |
  <%= link_to "Inactivate", survey_admin_question_path(@question),
                            :confirm  => 'Are you sure?',
                            :method   => :delete,
                            :class    => 'button' %> |
  <%= link_to "View Questions", survey_admin_questions_path, :class => 'button' %>
</p>
